using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VKUNDFORM
    {
        VKDSTAMM VKDSTAMM;
    }
    public partial class VKUNDFORM
    {
        public void SetUpNewRow(ref DataRow dwReturn)
        {

            switch (app.company)
            {
                case "YGR":
                case "YCC":
                default:
                    #region=========
                    dwReturn["KDFMANDANT"] = "00";
                    dwReturn["KDFFORMART"] = "E";
                    dwReturn["KDFVB"] = "   ";
                    dwReturn["KDFVG"] = "   ";
                    dwReturn["KDFLAND"] = "   ";
                    dwReturn["KDFKUNDNR"] = "00000016";
                    dwReturn["KDFADRSL"] = "        ";
                    dwReturn["KDFPROGRP"] = "   ";
                    dwReturn["KDFARTGRP"] = "   ";
                    dwReturn["KDFPOSTYP"] = "   ";
                    dwReturn["KDFVERSART"] = "   ";
                    dwReturn["KDFTAX"] = "   ";
                    dwReturn["KDFAKKRED"] = " ";
                    dwReturn["KDFLO"] = "  ";
                    dwReturn["KDFZESSION"] = " ";
                    dwReturn["KDFETIKETT"] = "        ";
                    dwReturn["KDFSERIE"] = "        ";
                    dwReturn["KDFPRAEFIX"] = "                    ";
                    dwReturn["KDFLGLFDNR"] = "0";
                    dwReturn["KDFPRUEFART"] = " ";
                    dwReturn["KDFPRFELDLG1"] = "0";
                    dwReturn["KDFPRFELDKZ1"] = " ";
                    dwReturn["KDFPRFELDLG2"] = "0";
                    dwReturn["KDFPRFELDKZ2"] = " ";
                    dwReturn["KDFPRFELDLG3"] = "0";
                    dwReturn["KDFPRFELDKZ3"] = " ";
                    dwReturn["KDFPRFELDLG4"] = "0";
                    dwReturn["KDFPRFELDKZ4"] = " ";
                    dwReturn["KDFPRFELDLG5"] = "0";
                    dwReturn["KDFPRFELDKZ5"] = " ";
                    dwReturn["KDFANZOK1"] = "01";
                    dwReturn["KDFKUNDNROK1"] = "        ";
                    dwReturn["KDFADROK1"] = "        ";
                    dwReturn["KDFRUN1"] = "01";
                    dwReturn["KDFFSATZ1"] = "O";
                    dwReturn["KDFMAIL1"] = "  ";
                    dwReturn["KDFMAILTXT1"] = "   ";
                    dwReturn["KDFDR1"] = "  ";
                    dwReturn["KDFFORM1"] = "        ";
                    dwReturn["KDFFORMULAR1"] = "W16     ";
                    dwReturn["KDFPROGRAMM1"] = "        ";
                    dwReturn["KDFFOLGEKZ1"] = "  ";
                    dwReturn["KDFUSERGR1"] = "  ";
                    dwReturn["KDFADRFKZ1"] = "  ";
                    dwReturn["KDFSPRKZ1"] = "  ";
                    dwReturn["KDFANZOK2"] = "00";
                    dwReturn["KDFKUNDNROK2"] = "        ";
                    dwReturn["KDFADROK2"] = "        ";
                    dwReturn["KDFRUN2"] = "00";
                    dwReturn["KDFFSATZ2"] = " ";
                    dwReturn["KDFMAIL2"] = "  ";
                    dwReturn["KDFMAILTXT2"] = "   ";
                    dwReturn["KDFDR2"] = "  ";
                    dwReturn["KDFFORM2"] = "        ";
                    dwReturn["KDFFORMULAR2"] = "        ";
                    dwReturn["KDFPROGRAMM2"] = "        ";
                    dwReturn["KDFFOLGEKZ2"] = "  ";
                    dwReturn["KDFUSERGR2"] = "  ";
                    dwReturn["KDFADRFKZ2"] = "  ";
                    dwReturn["KDFSPRKZ2"] = "  ";
                    dwReturn["KDFANZOK3"] = "00";
                    dwReturn["KDFKUNDNROK3"] = "        ";
                    dwReturn["KDFADROK3"] = "        ";
                    dwReturn["KDFRUN3"] = "00";
                    dwReturn["KDFFSATZ3"] = " ";
                    dwReturn["KDFMAIL3"] = "  ";
                    dwReturn["KDFMAILTXT3"] = "   ";
                    dwReturn["KDFDR3"] = "  ";
                    dwReturn["KDFFORM3"] = "        ";
                    dwReturn["KDFFORMULAR3"] = "        ";
                    dwReturn["KDFPROGRAMM3"] = "        ";
                    dwReturn["KDFFOLGEKZ3"] = "  ";
                    dwReturn["KDFUSERGR3"] = "  ";
                    dwReturn["KDFADRFKZ3"] = "  ";
                    dwReturn["KDFSPRKZ3"] = "  ";
                    dwReturn["KDFANZOK4"] = "00";
                    dwReturn["KDFKUNDNROK4"] = "        ";
                    dwReturn["KDFADROK4"] = "        ";
                    dwReturn["KDFRUN4"] = "00";
                    dwReturn["KDFFSATZ4"] = " ";
                    dwReturn["KDFMAIL4"] = "  ";
                    dwReturn["KDFMAILTXT4"] = "   ";
                    dwReturn["KDFDR4"] = "  ";
                    dwReturn["KDFFORM4"] = "        ";
                    dwReturn["KDFFORMULAR4"] = "        ";
                    dwReturn["KDFPROGRAMM4"] = "        ";
                    dwReturn["KDFFOLGEKZ4"] = "  ";
                    dwReturn["KDFUSERGR4"] = "  ";
                    dwReturn["KDFADRFKZ4"] = "  ";
                    dwReturn["KDFSPRKZ4"] = "  ";
                    dwReturn["KDFANZOK5"] = "00";
                    dwReturn["KDFKUNDNROK5"] = "        ";
                    dwReturn["KDFADROK5"] = "        ";
                    dwReturn["KDFRUN5"] = "00";
                    dwReturn["KDFFSATZ5"] = " ";
                    dwReturn["KDFMAIL5"] = "  ";
                    dwReturn["KDFMAILTXT5"] = "   ";
                    dwReturn["KDFDR5"] = "  ";
                    dwReturn["KDFFORM5"] = "        ";
                    dwReturn["KDFFORMULAR5"] = "        ";
                    dwReturn["KDFPROGRAMM5"] = "        ";
                    dwReturn["KDFFOLGEKZ5"] = "  ";
                    dwReturn["KDFUSERGR5"] = "  ";
                    dwReturn["KDFADRFKZ5"] = "  ";
                    dwReturn["KDFSPRKZ5"] = "  ";
                    dwReturn["KDFANZOK6"] = "00";
                    dwReturn["KDFKUNDNROK6"] = "        ";
                    dwReturn["KDFADROK6"] = "        ";
                    dwReturn["KDFRUN6"] = "00";
                    dwReturn["KDFFSATZ6"] = " ";
                    dwReturn["KDFMAIL6"] = "  ";
                    dwReturn["KDFMAILTXT6"] = "   ";
                    dwReturn["KDFDR6"] = "  ";
                    dwReturn["KDFFORM6"] = "        ";
                    dwReturn["KDFFORMULAR6"] = "        ";
                    dwReturn["KDFPROGRAMM6"] = "        ";
                    dwReturn["KDFFOLGEKZ6"] = "  ";
                    dwReturn["KDFUSERGR6"] = "  ";
                    dwReturn["KDFADRFKZ6"] = "  ";
                    dwReturn["KDFSPRKZ6"] = "  ";
                    dwReturn["KDFANZOK7"] = "00";
                    dwReturn["KDFKUNDNROK7"] = "        ";
                    dwReturn["KDFADROK7"] = "        ";
                    dwReturn["KDFRUN7"] = "00";
                    dwReturn["KDFFSATZ7"] = " ";
                    dwReturn["KDFMAIL7"] = "  ";
                    dwReturn["KDFMAILTXT7"] = "   ";
                    dwReturn["KDFDR7"] = "  ";
                    dwReturn["KDFFORM7"] = "        ";
                    dwReturn["KDFFORMULAR7"] = "        ";
                    dwReturn["KDFPROGRAMM7"] = "        ";
                    dwReturn["KDFFOLGEKZ7"] = "  ";
                    dwReturn["KDFUSERGR7"] = "  ";
                    dwReturn["KDFADRFKZ7"] = "  ";
                    dwReturn["KDFSPRKZ7"] = "  ";
                    dwReturn["KDFANZOK8"] = "00";
                    dwReturn["KDFKUNDNROK8"] = "        ";
                    dwReturn["KDFADROK8"] = "        ";
                    dwReturn["KDFRUN8"] = "00";
                    dwReturn["KDFFSATZ8"] = " ";
                    dwReturn["KDFMAIL8"] = "  ";
                    dwReturn["KDFMAILTXT8"] = "   ";
                    dwReturn["KDFDR8"] = "  ";
                    dwReturn["KDFFORM8"] = "        ";
                    dwReturn["KDFFORMULAR8"] = "        ";
                    dwReturn["KDFPROGRAMM8"] = "        ";
                    dwReturn["KDFFOLGEKZ8"] = "  ";
                    dwReturn["KDFUSERGR8"] = "  ";
                    dwReturn["KDFADRFKZ8"] = "  ";
                    dwReturn["KDFSPRKZ8"] = "  ";
                    dwReturn["KDFANZOK9"] = "00";
                    dwReturn["KDFKUNDNROK9"] = "        ";
                    dwReturn["KDFADROK9"] = "        ";
                    dwReturn["KDFRUN9"] = "00";
                    dwReturn["KDFFSATZ9"] = " ";
                    dwReturn["KDFMAIL9"] = "  ";
                    dwReturn["KDFMAILTXT9"] = "   ";
                    dwReturn["KDFDR9"] = "  ";
                    dwReturn["KDFFORM9"] = "        ";
                    dwReturn["KDFFORMULAR9"] = "        ";
                    dwReturn["KDFPROGRAMM9"] = "        ";
                    dwReturn["KDFFOLGEKZ9"] = "  ";
                    dwReturn["KDFUSERGR9"] = "  ";
                    dwReturn["KDFADRFKZ9"] = "  ";
                    dwReturn["KDFSPRKZ9"] = "  ";
                    dwReturn["KDFOPRDR"] = " ";
                    dwReturn["KDFDBLATT"] = " ";
                    dwReturn["KDFDRPARAM"] = "     ";
                    dwReturn["KDFLAYOUT"] = "        ";
                    dwReturn["KDFDRPARAMB"] = "          ";
                    dwReturn["KDFSERIELS"] = "  ";
                    dwReturn["KDFFILLER"] = "      ";
                    dwReturn["KDFAENZL"] = "0";
                    dwReturn["KDFAENB"] = "JLTV";
                    dwReturn["KDFAEND"] = "20140624";
                    dwReturn["KDFNEUB"] = "INTEXE  ";
                    dwReturn["KDFNEUD"] = "20140418";
                    #endregion
                    break;
            }
        } 
        public void InsertKUNDFORM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            or1 = OracleDB.CreateCommand();
            DataSet result = new DataSet();
            switch (ITXDBVERSION)
            {
                default:
                case "JLT":
                    or1.CommandText = " INSERT INTO KUNDFORM ( KDFMANDANT,KDFFORMART,KDFVB,KDFVG,KDFLAND,KDFKUNDNR,KDFADRSL,KDFPROGRP,KDFARTGRP,KDFPOSTYP,KDFVERSART,KDFTAX,KDFAKKRED,KDFLO,KDFZESSION,KDFETIKETT,KDFSERIE,KDFPRAEFIX,KDFLGLFDNR,KDFPRUEFART,KDFPRFELDLG1,KDFPRFELDKZ1,KDFPRFELDLG2,KDFPRFELDKZ2,KDFPRFELDLG3,KDFPRFELDKZ3,KDFPRFELDLG4,KDFPRFELDKZ4,KDFPRFELDLG5,KDFPRFELDKZ5,KDFANZOK1,KDFKUNDNROK1,KDFADROK1,KDFRUN1,KDFFSATZ1,KDFMAIL1,KD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ATZ8:,:KDFMAIL8:,:KDFMAILTXT8:,:KDFDR8:,:KDFFORM8:,:KDFFORMULAR8:,:KDFPROGRAMM8:,:KDFFOLGEKZ8:,:KDFUSERGR8:,:KDFADRFKZ8:,:KDFSPRKZ8:,:KDFANZOK9:,:KDFKUNDNROK9:,:KDFADROK9:,:KDFRUN9:,:KDFFSATZ9:,:KDFMAIL9:,:KDFMAILTXT9:,:KDFDR9:,:KDFFORM9:,:KDFFORMULAR9:,:KDFPROGRAMM9:,:KDFFOLGEKZ9:,:KDFUSERGR9:,:KDFADRFKZ9:,:KDFSPRKZ9:,:KDFOPRDR:,:KDFDBLATT:,:KDFDRPARAM:,:KDFLAYOUT:,:KDFDRPARAMB:,:KDFSERIELS:,:KDFFILLER:,:KDFAENZL:,:KDFAENB:,:KDFAEND:,:KDFNEUB:,:KDFNEUD:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;

            }
            Connect2Proxy(or1);
        }
        public DataSet QueryKUNDFORM(DataRow dwData, int option = 1)
        {

            DataSet Result;
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM KUNDFORM WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT * FROM KUNDFORM WHERE  "
                        + "  KDFMANDANT=:KDFMANDANT AND KDFPROGRAMM1=:KDFPROGRAMM1  AND KDFKUNDNR=:KDFKUNDNR AND KDFFORMART=:KDFFORMART";
                    or1.Parameters.Add("KDFMANDANT", OracleType.NVarChar).Value = dwData["KDFMANDANT"].ToString();
                    or1.Parameters.Add("KDFFORMART", OracleType.NVarChar).Value = dwData["KDFFORMART"].ToString();
                    or1.Parameters.Add("KDFKUNDNR", OracleType.NVarChar).Value = dwData["KDFKUNDNR"].ToString();
                    or1.Parameters.Add("KDFPROGRAMM1", OracleType.NVarChar).Value = dwData["KDFPROGRAMM1"].ToString();
                    break;
                case 2:
                    or1.CommandText = "SELECT KDKUNDNA,F.* FROM KUNDFORM F LEFT JOIN KDSTAMM ON KDFMANDANT=KDMANDANT AND  KDFKUNDNR=KDKUNDNR WHERE  "
                        + "  KDFMANDANT=:KDFMANDANT AND KDFFORMART=:KDFFORMART"
                        + " ORDER BY KDKUNDNA";
                    or1.Parameters.Add("KDFMANDANT", OracleType.NVarChar).Value = dwData["KDFMANDANT"].ToString();
                    or1.Parameters.Add("KDFFORMART", OracleType.NVarChar).Value = dwData["KDFFORMART"].ToString();
                    break;
                case -1:
                    or1.CommandText = "SELECT KDKUNDNA,F.* FROM KUNDFORM F LEFT JOIN KDSTAMM ON KDFMANDANT=KDMANDANT AND  KDFKUNDNR=KDKUNDNR WHERE  "
                        + "  KDFMANDANT=:KDFMANDANT AND KDFKUNDNR=:KDFKUNDNR"
                        + " ORDER BY KDKUNDNA";
                    or1.Parameters.Add("KDFMANDANT", OracleType.NVarChar).Value = dwData["KDFMANDANT"].ToString();
                    or1.Parameters.Add("KDFKUNDNR", OracleType.NVarChar).Value = dwData["KDFKUNDNR"].ToString();
                    break;
            }
            Result = Connect2Proxy(or1);
            Result.Tables[0].TableName = "KUNDFORM";
            return Result;
        }
        public void UpdateKUNDFORM(DataRow dwData, int option = 0)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE KUNDFORM SET KDFMANDANT=:KDFMANDANT:,KDFFORMART=:KDFFORMART:,KDFVB=:KDFVB:,KDFVG=:KDFVG:,KDFLAND=:KDFLAND:,KDFKUNDNR=:KDFKUNDNR:,KDFADRSL=:KDFADRSL:,KDFPROGRP=:KDFPROGRP:,KDFARTGRP=:KDFARTGRP:,KDFPOSTYP=:KDFPOSTYP:,KDFVERSART=:KDFVERSART:,KDFTAX=:KDFTAX:,KDFAKKRED=:KDFAKKRED:,KDFLO=:KDFLO:,KDFZESSION=:KDFZESSION:,KDFETIKETT=:KDFETIKETT:,KDFSERIE=:KDFSERIE:,KDFPRAEFIX=:KDFPRAEFIX:,KDFLGLFDNR=:KDFLGLFDNR:,KDFP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T9:,KDFDR9=:KDFDR9:,KDFFORM9=:KDFFORM9:,KDFFORMULAR9=:KDFFORMULAR9:,KDFPROGRAMM9=:KDFPROGRAMM9:,KDFFOLGEKZ9=:KDFFOLGEKZ9:,KDFUSERGR9=:KDFUSERGR9:,KDFADRFKZ9=:KDFADRFKZ9:,KDFSPRKZ9=:KDFSPRKZ9:,KDFOPRDR=:KDFOPRDR:,KDFDBLATT=:KDFDBLATT:,KDFDRPARAM=:KDFDRPARAM:,KDFLAYOUT=:KDFLAYOUT:,KDFDRPARAMB=:KDFDRPARAMB:,KDFSERIELS=:KDFSERIELS:,KDFFILLER=:KDFFILLER:,KDFAENZL=:KDFAENZL:,KDFAENB=:KDFAENB:,KDFAEND=:KDFAEND:,KDFNEUB=:KDFNEUB:,KDFNEUD=:KDFNEUD:"
                + " WHERE KDFMANDANT=:KDFMANDANT: AND KDFPROGRAMM1=:KDFPROGRAMM1:  AND KDFKUNDNR=:KDFKUNDNR: AND KDFFORMART=:KDFFORMART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
    }
}
